<?php 
    /*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 * autores: Carlos Castillo 
 */
if (isset($_SESSION["k_username"]) && isset($_GET['userq'])){
    include($_SESSION['dir'].'/basedatos.php'); 
      $baseD = new BaseDatos(); 
      if(!($baseD->existeAmistad($_SESSION["k_username"],$_GET['userq'])) && !($baseD->existeSolicitud($_SESSION["k_username"],$_GET['userq'])) ){ ?>	            
            	<form method='post' action='procesarEnvioSolicitud.php?userq=<?=$_GET['userq'];?>'  onsubmit="return show_confirm()">
			Mensaje:<br />
			<textarea name='message' rows='10' cols='30'>
			</textarea><br/>
			<input type='submit' value="Enviar"/>
		</form>
             </div> 
  <?php }elseif($baseD->existeSolicitud($_SESSION["k_username"],$_GET['userq']))
                          echo" Esperando respuesta";
}?>	

